home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / AmigaOS / Aplus_Dev / AP-Website / links / admin / configuration.php < prev    next >
Encoding:
PHP Script  |  2002-10-28  |  10.7 KB  |  336 lines

  1. <?
  2. // *******************************************************************
  3. //  admin/configuration.php
  4. // *******************************************************************
  5.  
  6. include("../include/config.php");
  7. include("../include/functions.php");
  8. include("../include/common.php");
  9.  
  10. $language = $gl["Language"];
  11.  
  12. include("../include/lang/$language.php");
  13.  
  14. include("../include/session.php");
  15. session_start();
  16. ?>
  17.  
  18. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  19. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  20. <html>
  21. <head>
  22. <title></title>
  23. <link rel = "stylesheet" type = "text/css" href = "style.css" />
  24. </head>
  25. <?=$adm_body?>
  26. <?
  27. if(isset($submit)){
  28.     
  29.     $update = sql_query("
  30.         update
  31.             $tb_settings
  32.         set
  33.             SiteTitle                =    '$SiteTitle',
  34.             Name                =    '$Name',
  35.             Email                =    '$Email',
  36.             DateFormat            =    '$DateFormat',
  37.             DefaultCountry        =    '$DefaultCountry',
  38.             ColCount                =    '$ColCount',
  39.             ManuallyValidate        =    '$ManuallyValidate',
  40.             URLValidate            =    '$URLValidate',
  41.             NewSubmissionEmail    =    '$NewSubmissionEmail',
  42.             SiteAdditionEmail        =    '$SiteAdditionEmail',
  43.             SiteDeletionEmail        =    '$SiteDeletionEmail',
  44.             PerPage                =    '$PerPage',
  45.             NavLinks                =    '$NavLinks',
  46.             BaseURL            =    '$BaseURL',
  47.             BasePath            =    '$BasePath',
  48.             Theme                =    '$theme',
  49.             Language            =    '$language',
  50.             OuterFrame            =    '$OuterFrame'
  51.         where
  52.             ID='1'
  53.     ");
  54. }
  55.  
  56. $gl_query = sql_query("
  57.     select
  58.         *
  59.     from
  60.         $tb_settings
  61.     where
  62.         ID='1'
  63. ");
  64.  
  65. $gl = sql_fetch_array($gl_query);
  66. ?>
  67.     <form action="configuration.php?<?=session_name()?>=<?=session_id()?>" method="post">
  68.         <table cellspacing="0" cellpadding="5" border="1" align="center" width="100%">
  69.         <tr>
  70.             <td colspan="2" class="theader">Site Configuration<? if(isset($submit)){ ?> - Update Complete<?}?></td>
  71.         </tr>
  72.         <tr>
  73.             <td valign="top" class="text">BaseURL:<br /><span class="small">Base URL for 
  74.             your site, no trailing slash please.  </span></td>
  75.             <td class="text"><input class="small" type="text" name="BaseURL" value="<?=$gl[BaseURL]?>" 
  76.             size="30" /></td>
  77.         </tr>
  78.         <tr>
  79.             <td valign="top" class="text">Base Path:<br /><span class="small">Base Path 
  80.             for the phpLinks files on your server, no trailing slash 
  81.             please.</span></td>
  82.             <td class="text"><input class="small" type="text" name="BasePath" value="<?=$gl[BasePath]?>" 
  83.             size="30" /></td>
  84.         </tr>
  85.         <tr>
  86.             <td valign="top" class="text">Site Title:<br /><span class="small">Site Title 
  87.             is what you want as the Title on the top of each page.  (example: 
  88.             Bob's Search Engine)</span></td>
  89.             <td class="text"><input class="small" type="text" name="SiteTitle" 
  90.             value="<?=$gl["SiteTitle"]?>" size="30" /></td>
  91.         </tr>
  92.         <tr>
  93.             <td valign="top" class="text">Site Owner Name:<br /><span class="small">Site 
  94.             Owner Name should be your name, or your company name. (example: 
  95.             Alfred E. Newman, Inc.)</span></td>
  96.             <td class="text"><input class="small" type="text" name="Name" value="<?=$gl["Name"]?>" 
  97.             size="30" /></td>
  98.         </tr>
  99.         <tr>
  100.             <td valign="top" class="text">Site Owner Email:<br /><span class="small">Site 
  101.             Owner Email should be the email address of the Site Owner. 
  102.             (example: fred@aol.com)</span></td>
  103.             <td class="text"><input class="small" type="text" name="Email" value="<?=$gl["Email"]?>" 
  104.             size="30" /></td>
  105.         </tr>
  106.         <tr>
  107.             <td valign="top" class="text">Date Format:<br /><span class="small">Date Format is for how you want the "Added" and "Last Updated" links to be formatted.<br /><br />Here are some popular choices:<br />M j, Y = August 10, 1972<br />m-d-y = 08-10-72<br /><br />For more info on date formatting see the manual: <a href="http://php.net/date" target="_blank">http://php.net/date</a></span></td>
  108.             <td class="text"><input class="small" type="text" name="DateFormat" value="<?=$gl["DateFormat"]?>" size="30" /></td>
  109.         </tr>
  110.         <tr>                                                                                                                
  111.             <td valign="top" class="text">Default Country:<br /><span class="small">Select the default country for your Add Site page.</span></td>
  112.             <td class="text"><?
  113.                 echo "<select class=\"small\" name=\"DefaultCountry\"><option ";
  114.                 echo "value=\"\">" . $add_47 . "</option>";                                                                                               
  115.                 if($d = dir("../images/flags")){
  116.                     echo getFlagList("../images/flags", $gl["DefaultCountry"]);
  117.                 }
  118.  
  119.                 echo "</select>";
  120.             ?></td>                                                                                           
  121.         </tr>
  122.         <tr>
  123.             <td valign="top" class="text">phpLinks Theme:<br /><span class="small">Select 
  124.             the look and feel of your phpLinks.</span></td>
  125.             <td class="text">
  126.                 <select class="small" name="theme"><?
  127.                     $theme = $gl["Theme"];
  128.  
  129.                     if($d = dir("../themes")){
  130.                         getDirList("../themes");
  131.                     }
  132.                 ?></select>
  133.             </td>
  134.         </tr>
  135.         <tr>
  136.              <td valign="top" class="text">Default Language:<br /><span class="small">Select the default language for your phpLinks.</span></td>
  137.              <td class="text"><select class="small" name="language"><?
  138.                     $language = $gl["Language"];
  139.  
  140.                     if($d = dir("../include/lang")){
  141.                             getLangList("../include/lang");
  142.                     }
  143.              ?></select></td>
  144.         </tr>
  145.     <tr>
  146.         <td valign="top" class="text">
  147.             Validate Sites Manually:
  148.             <br />
  149.             <span class="small">You may validate sites manually, meaning you must approve each submission before it will appear on the site, and submissions will be sent to the 'temp' table when first submitted.  Or you may allow site submissions to bypass the manual validation process and be directly addded to your 'links' table when first submitted.</span>
  150.         </td>
  151.         <td class="text">
  152.             <select class="small" name="ManuallyValidate"><?
  153.                 echo "<option value=\"Y\"";
  154.  
  155.                 if($gl[ManuallyValidate] == "Y"){
  156.                     
  157.                     echo " selected=\"selected\"";
  158.                 }
  159.  
  160.                 echo ">Yes</option><option value=\"N\"";
  161.  
  162.                 if($gl[ManuallyValidate] == "N"){
  163.                     
  164.                     echo " selected=\"selected\"";
  165.                 }
  166.  
  167.                 echo ">No</option>";    
  168.             ?></select>
  169.             </td>
  170.         </tr>    
  171.         <tr>
  172.             <td valign="top" class="text">Validate URLs Automatically:<br />
  173.             <span class="small">This contols whether add.php attempts to 
  174.             <i>fopen()</i> the submitted URL or not.  Do not set this to Yes if 
  175.             you plan to allow FTP server submissions, they will fail 
  176.             otherwise.  Do not set this to Yes if your webserver is under heavy 
  177.             load, the add.php may take a long time to return.</span></td>
  178.             <td class="text">
  179.                 <select class="small" name="URLValidate"><?
  180.                     echo "<option value=\"Y\"";
  181.                     
  182.                     if($gl[URLValidate] == "Y"){
  183.  
  184.                         echo " selected=\"selected\"";
  185.                     }
  186.                     
  187.                     echo ">Yes</option><option value=\"N\"";
  188.                     
  189.                     if($gl[URLValidate] == "N"){
  190.  
  191.                         echo " selected=\"selected\"";
  192.                     }
  193.                     
  194.                     echo ">No</option>";
  195.                     
  196.                 ?></select>
  197.             </td>
  198.         </tr>    
  199.         <tr>
  200.             <td valign="top" class="text">Send E-Mail on Site Addition:<br />
  201.             <span class="small">Select whether you wish to have email sent to each 
  202.             site owner if their site is validated and added to the database.  
  203.             This is automatically off if you do not Validate Sites 
  204.             Manually.</span></td>
  205.             <td class="text">
  206.                 <select class="small" name="SiteAdditionEmail"><?
  207.  
  208.                     echo "<option value=\"Y\"";
  209.  
  210.                     if($gl[SiteAdditionEmail] == "Y"){
  211.  
  212.                         echo " selected=\"selected\"";
  213.                     }
  214.  
  215.                     echo ">Yes</option><option value=\"N\"";
  216.  
  217.                     if($gl[SiteAdditionEmail] == "N"){
  218.  
  219.                         echo " selected=\"selected\"";
  220.                     }
  221.  
  222.                     echo ">No</option>";
  223.  
  224.                 ?></select>
  225.             </td>
  226.         </tr>
  227.         <tr>
  228.             <td valign="top" class="text">Send E-Mail on Site Deletion:<br />
  229.             <span class="small">Select whether you wish to have email sent to each 
  230.             site owner if their site is validated and deleted from the 
  231.             database.  This is automatically off if you do not Validate Sites 
  232.             Manually.</span></td>
  233.             <td class="text">
  234.                 <select class="small" name="SiteDeletionEmail"><?
  235.                     echo "<option value=\"Y\"";
  236.                     
  237.                     if($gl[SiteDeletionEmail] == "Y"){
  238.  
  239.                         echo " selected=\"selected\"";
  240.                     }
  241.  
  242.                     echo ">Yes</option><option value=\"N\"";
  243.                     
  244.                     if($gl[SiteDeletionEmail] == "N"){
  245.  
  246.                         echo " selected=\"selected\"";
  247.                     }
  248.  
  249.                     echo ">No</option>";
  250.  
  251.                 ?></select>
  252.             </td>
  253.         </tr>
  254.         <tr>
  255.             <td valign="top" class="text">Send E-Mail to you on new Site Submission:
  256.             <br /><span class="small">Select whether you want to recieve e-mail 
  257.             everytime a new site submission occurs.</span></td>
  258.             <td class="text">
  259.                 <select class="small" name="NewSubmissionEmail"><?
  260.  
  261.                     echo "<option value=\"Y\"";
  262.  
  263.                     if($gl[NewSubmissionEmail] == "Y"){
  264.  
  265.                         echo " selected=\"selected\"";
  266.                     }
  267.  
  268.                     echo ">Yes</option><option value=\"N\"";
  269.  
  270.                     if($gl[NewSubmissionEmail] == "N"){
  271.  
  272.                         echo " selected=\"selected\"";
  273.                     }
  274.  
  275.                     echo ">No</option>";
  276.  
  277.                 ?></select>
  278.             </td>
  279.         </tr>
  280.         <tr>
  281.             <td valign="top" class="text">Columns:<br /><span class="small">How many main 
  282.             category columns should appear on each page.</span></td>
  283.             <td class="text">
  284.                 <select class="small" name="ColCount"><?
  285.                     
  286.                     for($x=2;$x<5;$x++){
  287.  
  288.                         echo "<option value=\"" . $x . "\"";
  289.  
  290.                         if($gl[ColCount] == $x){
  291.  
  292.                             echo " selected=\"selected\"";
  293.                         }
  294.  
  295.                         echo "> " . $x . " </option>";
  296.                     }    
  297.                 ?></select>
  298.             </td>
  299.         </tr>
  300.         <tr>
  301.             <td valign="top" class="text">Navigation Links:<br /><span class="small">How 
  302.             large should the navigation links span on each page.</span></td>
  303.             <td class="text"><input class="small" type="text" name="NavLinks" value="<?=$gl[NavLinks]?>" 
  304.             size="5" /></td>
  305.         </tr>
  306.         <tr>
  307.             <td valign="top" class="text">Links Per Page:<br /><span class="small">How 
  308.             many links should appear on each page.</span></td>
  309.             <td class="text"><input class="small" type="text" name="PerPage" value="<?=$gl[PerPage]?>" 
  310.             size="5" /></td>
  311.         </tr>
  312.         <tr>
  313.             <td valign="top" class="text">
  314.                 Use Outer Frame:
  315.                 <br />
  316.                 <span class="small">Links to outgoing referrers can go into a frameset instead of into a new window.</span>
  317.             </td>
  318.             <td class="text">
  319.                 <select class="small" name="OuterFrame"><?
  320.                 echo "<option value=\"Y\"";
  321.                 if($gl[OuterFrame] == "Y"){echo " selected=\"selected\"";}
  322.                 echo ">Yes</option><option value=\"N\"";
  323.                 if($gl[OuterFrame] == "N"){echo " selected=\"selected\"";}
  324.                 echo ">No</option>";    
  325.                 ?></select>
  326.             </td>
  327.         </tr>    
  328.         <tr>
  329.             <td colspan="2" align="center" valign="top" class="text"><input class="button" type="submit" 
  330.             name="submit" value=" Update " /></td>
  331.         </tr>
  332.         </table>
  333.     </form>
  334. </body>
  335. </html>
  336.